<!DOCTYPE html>
<html>

<head>
    <style>
        .sprite-container {
            width: 500px;
            height: 500px;
            border: 1px solid #ccc;
            margin: 20px auto;
            overflow: hidden;
        }

        .sprite {
            width: 500px;
            height: 500px;
            background: url('../../images/js.jpeg');
            background-size: cover;
            animation: walk 4s steps(20) infinite;
        }

        @keyframes walk {
            from {
                transform: translateX(0);
            }

            to {
                transform: translateX(-500px);
            }
        }
    </style>
</head>

<body>
    <div class="sprite-container">
        <div class="sprite"></div>
    </div>
</body>

</html>